#include "udp_server.hpp"
#include <memory>
#include <string>
#include <cstdio>
using namespace std;
using namespace jrg;


static void usage(std::string proc)
{
   std::cout<<"Usage:\n\t"<<proc<<"serverip serverport\n"<<std::endl;
}

int main(int argc,char* argv[])
{
   if(argc!=2)
   {
      usage(argv[0]);
      exit(USAGE_ERR);
   }
   uint16_t port = atoi(argv[1]);

   unique_ptr<UdpServer> usvr(new UdpServer(port));

   usvr->InitServer();



   //UdpServer server(8080);
   //server.InitServer();
// server.Recv();
   return 0;
}